﻿using System.Data;
using WFC.DAL.Interfaces.PersistentStorage;
using WFC.DAL.Interfaces.StatementSources;
using WFC.DAL.StatementSources;

namespace WFC.DAL.PersistentStorage
{
    public class RefDataService : IRefDataService
    {

        public DataSet ReadRefDataByCategoryId(int categoryId)
        {
            IStatementSource statementSource = new ReadRefDataByIdStatementSource(categoryId);
            return DbManager.ExecuteStatement(statementSource);
        }

        public DataSet ReadAllRefData()
        {
            return DbManager.ExecuteStatement(new ReadAllRefDataStatementSource());
        }

    }
}
